﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Configuration;

/// <summary>
/// Summary description for D_Bank
/// </summary>
namespace Bestlife.ERP.DataAccess
{
    public class D_Bank
    {
        public D_Bank()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public static int addBankDetails(Bestlife.ERP.Entities.E_Registration reg)
        {
            SqlConnection conn_new = new SqlConnection();
            int status = 0;
            try
            {
                String connStr = ConfigurationManager.ConnectionStrings["MainConnStr"].ConnectionString;
                Bestlife.ERP.DataAccess.clsCon.connect(connStr);

                String Ssql = "INSERT INTO Tbl_Bank(Dis_ID,Bank_Name,Bank_Code,Bank_Branch,Bank_Br_Code,Acc_No)VALUES('" + reg.Dis_Id1 + "','" + reg.Bank_Name1 + "','" + reg.Bank_Code1 + "','" + reg.Branch_Name1 + "','" + reg.Branch_Code1 + "','" + reg.Account_No1 + "')";
                Boolean exec = Bestlife.ERP.DataAccess.clsCon.AddEditDel(Ssql);
                clsCon.conn_new.Close();
            }

            catch (Exception)
            {
                // Console.WriteLine(exx);
            }
            return status;
        }



    }
}